package com.xomily.devops.domain;

import java.math.BigDecimal;
import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.xomily.common.annotation.Excel;
import com.xomily.common.core.domain.BaseEntity;

/**
 * 主机信息对象 dev_host
 * 
 * @author xomily
 * @date 2021-11-29
 */
public class DevHost extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 名称 */
    @Excel(name = "名称")
    private String name;

    /** Ip地址 */
    @Excel(name = "Ip地址")
    private String ip;

    /** 主机名称 */
    @Excel(name = "主机名称")
    private String hostname;

    /** 系统名称 */
    @Excel(name = "系统名称")
    private String os;

    /** 系统架构 */
    @Excel(name = "系统架构")
    private String arch;

    /** CPU型号 */
    @Excel(name = "CPU型号")
    private String cpu;

    /** CUP核心数 */
    @Excel(name = "CUP核心数")
    private Integer cpuCores;

    /** CPU使用率 */
    @Excel(name = "CPU使用率")
    private double cpuRate;

    /** 温度 */
    @Excel(name = "温度")
    private double temperature;

    /** 风扇 */
    @Excel(name = "风扇")
    private String fan;

    /** 内存大小 */
    @Excel(name = "内存大小")
    private Long mem;

    /** 内存使用率 */
    @Excel(name = "内存使用率")
    private double memRate;

    /** 状态:0停用1正常 */
    @Excel(name = "状态:0停用1正常")
    private String status;

    /** 状态:0停用1在线2告警3失联 */
    @Excel(name = "状态:0停用1在线2告警3失联")
    private String runStatus;

    /** 安全令牌 */
    @Excel(name = "安全令牌")
    private String secretKey;

    private List<DevDisc> discs;

    private List<DevNet> nets;
    
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setIp(String ip) 
    {
        this.ip = ip;
    }

    public String getIp() 
    {
        return ip;
    }
    public void setHostname(String hostname) 
    {
        this.hostname = hostname;
    }

    public String getHostname() 
    {
        return hostname;
    }
    public void setOs(String os) 
    {
        this.os = os;
    }

    public String getOs() 
    {
        return os;
    }
    public void setArch(String arch) 
    {
        this.arch = arch;
    }

    public String getArch() 
    {
        return arch;
    }
    public void setCpu(String cpu) 
    {
        this.cpu = cpu;
    }

    public String getCpu() 
    {
        return cpu;
    }
    public void setCpuCores(Integer cpuCores) 
    {
        this.cpuCores = cpuCores;
    }

    public Integer getCpuCores() 
    {
        return cpuCores;
    }
    public void setCpuRate(double cpuRate) 
    {
        this.cpuRate = cpuRate;
    }

    public double getCpuRate() 
    {
        return cpuRate;
    }
    public void setTemperature(double temperature) 
    {
        this.temperature = temperature;
    }

    public void setFan(String fan) 
    {
        this.fan = fan;
    }

    public String getFan() 
    {
        return fan;
    }
    
    public double getTemperature() 
    {
        return temperature;
    }
    public void setMem(Long mem) 
    {
        this.mem = mem;
    }

    public Long getMem() 
    {
        return mem;
    }
    public void setMemRate(double memRate) 
    {
        this.memRate = memRate;
    }

    public double getMemRate() 
    {
        return memRate;
    }
     public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setRunStatus(String runStatus) 
    {
        this.runStatus = runStatus;
    }

    public String getRunStatus() 
    {
        return runStatus;
    }
    public void setSecretKey(String secretKey) 
    {
        this.secretKey = secretKey;
    }

    public String getSecretKey() 
    {
        return secretKey;
    }

    public void setDiscs(List<DevDisc> discs) 
    {
        this.discs = discs;
    }

    public List<DevDisc> getDiscs() 
    {
        return discs;
    }
    
    public void setNets(List<DevNet> nets) 
    {
        this.nets = nets;
    }

    public List<DevNet> getNets() 
    {
        return nets;
    }
    
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("ip", getIp())
            .append("hostname", getHostname())
            .append("os", getOs())
            .append("arch", getArch())
            .append("cpu", getCpu())
            .append("cpuCores", getCpuCores())
            .append("cpuRate", getCpuRate())
            .append("temperature", getTemperature())
            .append("mem", getMem())
            .append("memRate", getMemRate())
            .append("status", getStatus())
            .append("runStatus", getRunStatus())
            .append("secretKey", getSecretKey())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
